<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台--文章管理</title>
    <link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>images/style.css" />
    <base target="_self"/>

    <script src='<?php echo isset($skin)?$skin:"";?>js/jquery.min.js'></script>
    <script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/jquery.form.min.js"></script>
    <script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/dist/dialog-min.js"></script>
    <script src="<?php echo isset($skin)?$skin:"";?>js/admin.js"></script>
    <script type="text/javascript">
        <!--
        $(document).ready(function () {
            $('.new_table tbody tr:even').addClass('h'); //奇偶变色，添加样式
        });
        //-->
    </script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>/js/validate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artTemplate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artTemplate-plugin.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/form.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artDialog.js"></script>
<script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/iframeTools.js"></script>
<link rel="stylesheet" href="<?php echo isset($skin)?$skin:"";?>js/artdialog.css" type="text/css">
</head>
<body>
<div class="hh6"></div>
<body style="width:700px;min-height:400px;">
<div class="pop_win">
    <form name="groupPriceForm">
        <table class="border_table" style="width:100%">
            <thead>
            <tr>
                <th>会员组名称</th>
                <th>商品价格</th>
                <th>默认价格</th>
                <th>会员组折扣率</th>
            </tr>
            </thead>
            <tbody>
            <?php if(is_array($groupList))  foreach($groupList as $v) { ?>
            <tr class='td_c'>
                <td><?php echo isset($v->group_name)?$v->group_name:"";?></td>
                <td><input type="text" name="groupPrice<?php echo isset($v->id)?$v->id:"";?>" class="small" pattern="float" /></td>
                <td>￥<?php echo (($v->discount/100)*$sell_price);?></td>
                <td><?php echo isset($v->discount)?$v->discount:"";?></td>
            </tr>
            <?php }?>
            </tbody>
        </table>
    </form>
</div>
<script type='text/javascript'>
    $(function(){
        var groupPrice = art.dialog.data('groupPrice');
        if(groupPrice)
        {
            var groupPriceObject = $.parseJSON(groupPrice);
            for(var groupId in groupPriceObject)
            {
                $('input[name="groupPrice'+groupId+'"]').val(groupPriceObject[groupId]);
            }
        }
    });
</script>
